<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class WinRecord extends Model
{
    protected $table = "win_record";
    protected $fillable = [];

    public function getNicknameAttribute(){
        if ($this->attributes['nickname']=='' || $this->attributes['nickname']==null){
            return substr_replace($this->attributes['mobile'],'****',3,4);
        }else{
            return $this->attributes['nickname'];
        }
    }
}
